Blue stretch using restricted color range and soft transition boundary

ABSTRACT

System and method for increasing the blue component of white and near white pixels while avoiding hard transitions and without affecting flesh-tone colors. Pixels that are bright enough and fall within a detection area in the UV-plane have their blue components increased and their red components decreased. The detection area is limited to avoid application of blue stretch to flesh-tone colors. A transition boundary is provided around the detection area for gradually decreasing the amount of blue stretch as pixels move away from the boundary of the detection area, thereby avoiding hard transitions between areas that are blue stretched and areas that are not blue stretched.

BACKGROUND OF THE INVENTION

The present invention relates generally to adjusting pixel colors fordisplay and, more particularly, to increasing the blue component inwhite and near white colors.

“Blue stretch” refers to increasing the blue value of white and nearwhite colors in order to make whites appear brighter to the eye. Whenapplying blue stretch to a set of pixels it is desirable to avoid bluestretching pixels in specified color ranges. Furthermore, it isdesirable to prevent visible boundaries between areas that have beenblue stretched and areas that have not been blue stretched.

Therefore, what is needed is a system and method for increasing the bluecomponent of white and near white pixels while avoiding hard transitionsand without affecting pixels in specified color ranges.

SUMMARY OF THE INVENTION

To achieve the foregoing and other objects and according to the purposeof the present invention, what is provided is a system and method forincreasing the blue component of white and near white pixels whileavoiding hard transitions and without affecting pixels in specifiedcolor ranges. Pixels that are bright enough and fall within a detectionarea in the UV-plane have their blue components increased and their redcomponents decreased. The detection area is limited to avoid applicationof blue stretch to pixels in specified color ranges. A transitionboundary is provided around the detection area for gradually decreasingthe amount of blue stretch as pixels move away from the boundary of thedetection area, thereby avoiding hard transitions between areas that areblue stretched and areas that are not blue stretched.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example, and not by wayof limitation, in the figures of the accompanying drawings and in whichlike reference numerals refer to similar elements and in which:

FIG. 1 is a graph illustrating the application of blue stretch, inaccordance with an embodiment of the present invention.

FIG. 2 is a graph in the UV-plane defining a detection area, inaccordance with an embodiment of the present invention.

FIG. 3 is a graph in the UV-plane illustrating a soft transitionboundary added around the detection area, in accordance with anembodiment of the present invention.

FIG. 4 is a flow diagram illustrating a method for applying bluestretch, in accordance with an embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

In the following description, numerous specific details are set forth inorder to provide a thorough understanding of the present invention. Itwill be understood, however, to one skilled in the art, that the presentinvention may be practiced without some or all of these specificdetails. In other instances, well known color space concepts andhardware design processes have not been described in detail in order notto unnecessarily obscure the present invention.

Accordingly, what is provided is a system and method for increasing theblue component in white and near white pixels in order for those pixelsto appear brighter to the eye, while at the same time avoiding hardtransitions and without affecting pixels in specified color ranges.

Although in the following description it is assumed that image pixelcolors are expressed using the YUV color model (and occasionally the RGBcolor model), it will be understood to one of ordinary skill in the artthat conversion between different color models may be used to apply thepresent invention.

The inputs to the disclosed blue stretch algorithm are the Y, U and Vcomponents of a pixel value. Pixels having a luma value greater than aspecified fraction of the maximum possible luma value are deemed brightenough to be blue stretched. To determine the amount of blue stretch tobe applied to such a pixel, a detection area having a transitionboundary is defined in the UV-plane. Pixels that fall within thedetection area are blue stretched the most. Pixels that are outside thedetection area but within the transition boundary are blue stretched toa lesser degree, with the amount of blue stretch decreasing as thedistance from the pixel to the edge of the detection area increases. Thedetection area is properly limited in order to avoid blue stretchingpixels in specified color ranges. Options are provided to help preventovershooting maximum allowed blue values.

Minimum Luma Value and Blue Gain Factor

A pixel is deemed bright enough and hence eligible for blue stretch ifits luma (Y) value is greater than a minimum luma value, expressed as aminimum luma percentage of the maximum possible Y-value. In thedescribed embodiment, an exemplary minimum luma percentage range ofabout 70% to 90% works well. By way of example, a minimum lumapercentage of about 80% of the maximum possible Y-value has been foundto work well. The minimum luma percentage is applied to whatever rangeis used for the pixel luma values (e.g. 16 to 235 versus 0 to 255),thereby preventing the blue stretched luma values from overshooting theupper limit of the particular luma range in use.

Applying blue stretch to a pixel that is bright enough comprisesincreasing the blue (U) value and decreasing the red (V) value of thepixel by a blue gain factor in a predetermined range, although asdescribed below different pixels may receive different degrees of bluestretch. It should be noted that a range of about 2% to 10% works well.Since application of blue gain values above 10% generally results innoticeable blue tinting of the image, blue gain values are preferablykept below 10%. However, if the particular application allows fornoticeable blue tinting, the blue gain factor can be increased.Conversely, if the application comprises mainly grayscale pixels, a bluegain value above 6% may result in whites appearing unnaturally blue. Byway of example, a blue gain factor of about 4% has been found to workwell.

The amount of blue stretch applied to a pixel depends on the location ofthe pixel within the UV-plane. If the pixel falls within the specifieddetection area in the UV-plane, it is blue stretched according to thefull value of the specified blue gain factor. This is referred to as“full blue stretch”. If the pixel falls outside of the detection areabut is inside the transition boundary area around the detection area,the pixel is blue stretched according to a fraction of the blue gainfactor, with the fraction decreasing linearly as the distance from thepixel to the edge of the detection area increases. This is referred toas “partial blue stretch” and allows for soft transition between pixelsthat are blue stretched and pixels that are not blue stretched. Thetransition boundary and partial blue stretch are described in moredetail below.

FIG. 1 is a graph illustrating the application of blue stretch, inaccordance with an embodiment of the present invention. The horizontalaxis represents the pixel's luma expressed as a percentage of themaximum Y-value. The vertical axis represents the output level of eachcomponent (blue, red and green) after a full blue stretch, expressed asa percentage of maximum Y-value. As shown in FIG. 1, pixels above theminimum luma value of 80% of maximum Y-value have their blue and redcomponents adjusted according to the blue gain.

As shown in FIG. 1, the blue (U) value is increased by about 4% (shownby the dotted line 120), the red (V) value is decreased by about 4%(shown by the dotted line 122), and the green (Y) value is unchanged(shown by the dotted line 121).

Avoiding Pixels in Specified Color Ranges

Blue stretch is generally applied to white and near white colors inorder to make them appear brighter to the eye. FIG. 2 illustrates theUV-plane and shows a detection axis 102 oriented about −30° from theU-axis positioned along the white and near white colors in the YUV-colorspace. The origin of the graph represents the grayscale values. Upperand lower boundary lines 106 and 107 define between them a band 111running along the white and near white colors. An area parameter 103indicates the (vertical) width of the band 111 as measured verticallyfrom the detection axis 102 to the boundary lines 106 and 107. The areaparameter 103 and its negative indicate where the upper and lowerboundary lines 106 and 107 cross the V-axis.

When applying blue stretch, it may be desirable to avoid blue stretchingpixels in specified color ranges. In such a case, application of bluestretch is limited to pixels that fall within a detection area 101represented as a subset of the band 111 in the UV-plane. The detectionarea is defined by limiting the band 111 using boundary lines thatsegregate away specified color ranges in the UV-plane (indicating thespecified color ranges to avoid) from the band 111.

One example of such a specified color range to avoid is represented bythe flesh-tone colors, since the human eye is sensitive to flesh-tonesand readily perceives a blue tint in flesh-tone colors as unnatural.Accordingly, one embodiment of the present invention blue stretcheswhites and near whites while avoiding blue stretching pixels that fallwithin flesh-tone colors. Specifically, in order to prevent bluestretching pixels in deeper regions of the yellow, orange and greenareas of the UV-plane and causing excessive adjustment to such hues, twoparameters are introduced: a Yellow Option (Y_Option) 104 and a GreenOption (G_Option) 105.

As shown in FIG. 2, the Y_Option 104 represents a boundary line limitingthe band 111 in the yellow-orange region. The G_Option 105 represents avertical boundary line, limiting the band 111 in the yellow-green regionby setting a minimum U-value in the range of about −15 to 10 (for RGBvalues ranging from 0 to 255). By way of example, a minimum U-value of−3 has been found to work well. The combination of the G_Option 105 andthe Y_Option 104 prevents blue stretch from affecting flesh-tone colors.

Furthermore, in order to control the saturation range in which bluestretch is applied, a saturation limit line 109 is defined. As shown inFIG. 2, the saturation limit line is perpendicular to the detection axis102 and comprises a slope of about 60° from the U-axis. The saturationlimit line 109 is defined by a saturation limit parameter 108representing a V-intercept.

The detection area 101 is simply the result of limiting the band 111 bythe boundary lines for avoiding specific color ranges, as well and theboundary line for controlling the saturation range in which blue stretchis applied.

Soft Transition Boundary

To prevent visible boundaries between areas that have been bluestretched and areas that have not been blue stretched, a soft transitionboundary 110 is added around the detection area 101 defined above, asillustrated in FIG. 3 in accordance with an embodiment of the presentinvention. The soft transition boundary 110 is used to extend thedetected region beyond the detection area 101 by a soft boundaryparameter s representing an offset off of the hard boundary of detectionarea 101. The blue gain applied to pixel values that lie between thehard and soft boundary is linearly decreased by the amount the pixelvalues extend beyond the hard boundary.

If the pixel's chroma (U and V) values fall within the detection area101, the pixels is blue stretched according to the full value of theblue gain factor. If the pixel falls outside of the detection area 101,the distance from the edge of the detection area 101 is computed.

For a pixel that is not to the left of the G_Option 105 boundary, thisdistance is defined as the vertical distance from the pixel to the edgeof the detection area 101. For pixels that are to the left of theG_Option 105 boundary, the distance is defined as the larger of (1) thehorizontal distance from the minimum U-value, and (2) the verticaldistance from the closest of the two boundary lines 107 and 104. Thetransition boundary 110 is simply the region where the distance thusdefined is within a defined threshold. By way of example, a thresholdvalue of 8 (for RGB values ranging from 0 to 255) has been found to workwell.

Pixels that are outside the detection area 101 but fall within thetransition boundary 110 are blue stretched according to a fraction ofthe blue gain factor, with the fraction linearly decreasing withincreasing distance from the pixel to the edge of the detection area101. By way of example, the fraction is set to about 100% at theboundary of the detection area 101, and set to about 0% at the outeredge of the transition boundary 110.

Overshooting a Maximum Allowed Blue Value

When increasing the blue component of pixels in a blue stretch, it ispossible to produce values of blue great than the maximum blue value(e.g. 255). There are several options for dealing with the overshootingof the maximum allowed blue value:

(1) Simply clamp the blue values in the allowable blue range (e.g. 0 to255).

(2) Limit the blue component by the maximum allowable blue value (e.g.255) and rescale the red and green components to preserve the relativeratios of the three components.

(3) Limit the blue component by the maximum allowable blue value andrescale the red component to preserve the relative ratio of the blue andred components, leaving the green component unchanged.

Option (2) above is less desirable, since resealing both the red and thegreen components results in a darkening rather than a brightening.Options (1) and (3) work well. In general, differences between options(1) and (3) are not very noticeable and can be simulated by altering theblue gain factor. Therefore, it may be desirable to implement thesimpler option (1).

Although the invention has been described in the context of a fixed sizedetection area 101, an optional embodiment adjusts the size of thedetection area 101 according to the pixel luma (Y) value. By way ofexample, increasing the size of the detection area 101 (and theassociated soft transition boundary 110) linearly with the value of Y,for Y in the range of 235 and 255, has been found to work well.

Since both the area parameter 103 and the soft boundary parameter saffect the overall detection area, increasing s not only results incolor blending, but also affects whether colors around the white rangeare changed as well. Therefore, when tuning the parameters it isdesirable to change the area parameter 103 and the soft boundaryparameter s together.

As described above, the Y_Option and the G_Option are used to preventlight skin-tone colors from changing. Optionally, it is possible to turnoff either the Y_Option or the G_Option while still protecting theskin-tone colors. However, turning off both the Y_Option and theG_Option may result in undesirable skin-tone changes.

FIG. 4 is a flow diagram illustrating a method for applying bluestretch, in accordance with an embodiment of the present invention. If130 the pixel under consideration is not bright enough, do not 131 alterits component values. Otherwise, if 132 the pixel is within thedetection area 101, increase 133 the blue component and decrease the redcomponent of the pixel (according to parameters described above). If thepixel is bright enough and outside of the detection area but falls 134within the soft transition boundary 110, use the pixel distance from theedge of the detection area 101 to compute 135 an appropriate blue gainfor a partial blue stretch, and partially blue stretch 136 the pixel. Ifthe pixel is bright enough but falls outside of the detection area 101and the soft transition boundary 110, do not 131 alter the pixelcomponent values.

The present invention can be embodiment in software or middleware, or incomputer hardware such as in an Application Specific Integrated Circuit(ASIC) or other integrated circuit. A hardware embodiment may optionallybe coupled, or reside in, a display apparatus, a graphics card or anyother apparatus for processing and/or presenting visual information.

Foregoing described embodiments of the invention are provided asillustrations and descriptions. They are not intended to limit theinvention to precise form described. Other variations and embodimentsare possible in light of above teachings, and it is thus intended thatthe scope of invention not be limited by this Detailed Description, butrather by claims following.

1. A method for applying blue stretch to a pixel, comprising:determining whether the pixel falls within a detection area in theUV-plane and has a luma (Y) value greater than a luma threshold; andapplying blue stretch to the pixel when the pixel falls within thedetection area; whereby adjustments to pixels in one or more colorranges are kept small by limiting the detection area in the one or morecolor ranges of the UV-plane.
 2. A method as recited in claim 1, whereinthe detection area is limited by a first boundary line above a detectionaxis and a second boundary line below the detection axis, the detectionaxis having an origin intercept and a slope of approximately −30° fromthe U-axis.
 3. A method as recited in claim 1, wherein the one or morecolor ranges comprise flesh-tone colors as represented by ayellow-orange region and a yellow-green region of the UV-plane.
 4. Amethod as recited in claim 3, wherein the detection area is limited inthe yellow-orange region of the UV-plane by a first boundary line.
 5. Amethod as recited in claim 4, wherein the detection area is limited inthe yellow-green region of the UV-plane by a second boundary linerepresenting a minimum U-value in the range of approximately −15 to 10.6. A method as recited in claim 1, wherein the luma threshold is in therange of approximately 70% to 90% of the maximum possible luma value. 7.A method as recited in claim 1, wherein applying blue stretch comprisesincreasing the blue component of the pixel by a blue gain factor in therange of approximately 2% to 10%.
 8. A method as recited in claim 7,wherein applying blue stretch further comprises decreasing the redcomponent of the pixel according to the blue factor.
 9. A method asrecited in claim 5, wherein the detection area is further limited by athird boundary line for controlling the saturation range in which bluestretch is applied.
 10. A method as recited in claim 1, furthercomprising: determining whether the pixel falls within a transition areasurrounding the detection area in the UV-plane; and applying partialblue stretch to the pixel when the pixel falls outside the detectionarea but within the transition area; thereby reducing visible boundariesbetween pixels that are blue stretched and pixels that are not bluestretched.
 11. A method as recited in claim 10, wherein applying partialblue stretch comprises increasing the blue component of the pixel by ablue gain factor, wherein the blue gain factor decreases with increasingpixel distance from the detection area.
 12. A method as recited in claim11, wherein the blue gain factor: (1) has a value in the range ofapproximately 2% to 10% at the boundary of the detection area; (2) hasand a value of 0% outside of the transition area; and (3) decreaseslinearly with increasing pixel distance from the detection area.
 13. Amethod as recited in claim 11, wherein applying partial blue stretchcomprises decreasing the red component of the pixel by the blue gainfactor.
 14. A method as recited in claim 12, wherein applying partialblue stretch comprises decreasing the red component of the pixel by theblue gain factor.
 15. An apparatus for applying blue stretch to a pixel,comprising: a controller for: (a) receiving luma (Y) and chroma (UV)values describing the pixel; (b) determining whether the pixel fallswithin a detection area in the UV-plane and has a luma value greaterthan a luma threshold; and (c) applying blue stretch to the pixel whenthe pixel falls within the detection area; whereby adjustments to one ormore color ranges are kept small by limiting the detection area in theone or more color ranges of the UV-plane.
 16. An apparatus as recited inclaim 15, further comprising a display for displaying the pixel.
 17. Anapparatus as recited in claim 15, wherein the detection area is limitedby a first boundary line above a detection axis and a second boundaryline below the detection axis, the detection axis having an originintercept and a slope of approximately −30° from the U-axis.
 18. Anapparatus as recited in claim 15, wherein the one or more color rangescomprise flesh-tone colors as represented by a yellow-orange region anda yellow-green region of the UV-plane.
 19. An apparatus as recited inclaim 18, wherein the detection area is limited in the yellow-orangeregion of the UV-plane by a first boundary line.
 20. An apparatus asrecited in claim 19, wherein the detection area is limited in theyellow-green region of the UV-plane by a second boundary linerepresenting a minimum U-value in the range of approximately −15 to 10.21. An apparatus as recited in claim 15, wherein the luma threshold isin the range of approximately 70% to 90% of the maximum possible lumavalue.
 22. An apparatus as recited in claim 15, wherein applying bluestretch comprises increasing the blue component of the pixel by a bluegain factor in the range of approximately 2% to 10%.
 23. An apparatus asrecited in claim 22, wherein applying blue stretch further comprisesdecreasing the red component of the pixel according to factor in therange of approximately 2% to 10%.
 24. An apparatus as recited in claim20, wherein the detection area is further limited by a third boundaryline for controlling the saturation range in which blue stretch isapplied.
 25. An apparatus as recited in claim 15, the controller furtherfor: (d) determining whether the pixel falls within a transition areasurrounding the detection area in the UV-plane; and (e) applying partialblue stretch to the pixel when the pixel falls outside the detectionarea but within the transition area; thereby reducing visible boundariesbetween pixels that are blue stretched and pixels that are not bluestretched.
 26. An apparatus as recited in claim 25, wherein applyingpartial blue stretch comprises increasing the blue component of thepixel by a blue gain factor, wherein the blue gain factor decreases withincreasing pixel distance from the detection area.
 27. An apparatus asrecited in claim 26, wherein the blue gain factor: (1) has a value inthe range of approximately 2% to 10% at the boundary of the detectionarea; (2) has and a value of 0% outside of the transition area; and (3)decreases linearly with increasing pixel distance from the detectionarea.
 28. An apparatus as recited in claim 26, wherein applying partialblue stretch comprises decreasing the red component of the pixel by theblue gain factor.
 29. An apparatus as recited in claim 27, whereinapplying partial blue stretch comprises decreasing the red component ofthe pixel by the blue gain factor.